package com.lihui.config;

import com.lihui.test.Mobile;
import com.lihui.test.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * 功能描述
 *
 * @author wileda
 * @date 2023/04/21  14:56
 */
@Component
public class AppConfig {
    @Bean
    public Person p1(){
        return new Person();
    }

    @Bean
    public Person p2(){
        return new Person();
    }

    @Bean("m")
    public Mobile m1(){
        Mobile mobile = new Mobile();
        mobile.setName("华为p13");
        return mobile;
    }
}
